package com.xuecheng.content.api;

import com.xuecheng.content.model.dto.CourseCategoryTreeDTo;
import com.xuecheng.content.service.CourseCategoryService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Api(value = "课程分类接口")
@RestController
public class CategoryInfoController {
    @Autowired
    private CourseCategoryService courseCategoryService ;

    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryTreeDTo> queryTreeNodes(){
        return courseCategoryService.queryTreeNodes();
    }
}
